import { Injectable } from '@angular/core';

import { Observable } from 'rxjs';

import { HttpRequestService } from '../../core/services/http-request.service';

@Injectable()
export class UserService {
    constructor(private httpRequestService: HttpRequestService) { }

    changeStatus(data: any): Observable<any> {
        return this.httpRequestService.post<any>('/user/changeStatus', data);
    }

    create(data: any): Observable<any> {
        return this.httpRequestService.post<any>('/user/create', data);
    }

    getUsersList(data: any): Observable<any> {
        return this.httpRequestService.get<any>('/user/list', data);
    }

    getUserInfo(data: any): Observable<any> {
        return this.httpRequestService.get<any>('/user/getUserInfo', data);
    }

    update(data: any): Observable<any> {
        return this.httpRequestService.post<any>('/user/update', data);
    }

    getMatchedStatus(data: any): Observable<any> {
        return this.httpRequestService.getWithoutBaseUrl<any>('assets/user-demo-data/status.json');
    }
}